package mianxiangduixiang.Test5;

public class Student extends Personal {
    int studentID, grade;
    String department;

    public Student() {
    }

    public Student(int id, int age, String name, String sex, int studentID, int grade, String department) {
        super(id, age, name, sex);
        this.studentID = studentID;
        this.grade = grade;
        this.department = department;
    }


    public String getInfo() {
        return toString();
    }

    @Override
    public String toString() {
        return super.toString()+" Student{" +
                "studentID=" + studentID +
                ", grade=" + grade +
                ", department='" + department + '\'' +
                '}';
    }

    public void print() {
        System.out.println(getInfo());
    }

}
